package com.smart.manager.task;


import com.smart.common.annotation.TaskBean;
import com.smart.common.annotation.TaskMethod;
import com.smart.common.entities.domain.TaskResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * 模拟任务 有参和无参任务模拟
 *
 * @author Administrator
 * @date 2022/09/16
 */
@Log4j2
@Component
@TaskBean
@RequiredArgsConstructor
public class MockTask {



    @TaskMethod(title = "有参测试程序", remark = "参数示例:{ name:张三, sex:1}")
    public synchronized TaskResult autoRun(String params) {
        return new TaskResult(true, "执行成功!");
    }


    @TaskMethod(title = "无参测试程序")
    public synchronized TaskResult autoRunX() {
        return new TaskResult(true, "执行成功!");

    }
}
